<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>应用状态</title>
    <script src="../../resources/src/js/angular.js"></script>
</head>
<body>
    <h3>ng-model 指令可以为应用数据提供状态值(invalid, dirty, touched, error):</h3>
    <form ng-app="" name="myForm" ng-init="myText = 'test@runoob.com'">
        Email:
        <input type="email" name="myAddress" ng-model="myText" required></p>
        <h1>状态</h1>
        {{myForm.myAddress.$valid}}
        {{myForm.myAddress.$dirty}}
        {{myForm.myAddress.$touched}}
        {{myForm.myAddress.$error.email}}
    </form>
</body>
</html>